<form id="app-form" class="layui-form layuimini-form">
    <input type="hidden" name="group_name" value="door">
    <div class="layui-form-item">
        <label class="layui-form-label">IP过滤规则</label>
        <div class="layui-input-block">

            {foreach \app\admin\model\SystemConfig::LIST_RULE_TYPE as $key=>$vo }
            <input type="radio" name="door_default_rule" value="{$key}" title="{$vo}" {if sysconfig('door','door_default_rule','whitelist_only')==$key }checked="" {/if}>
            {/foreach}
            <div>
                <tip>白名单模式：只有白名单的IP放行</tip><br>
                <tip>黑名单模式：只有黑名单的IP拦截</tip><br>
                <tip>混合模式：根据白名单和黑名单进行放行和拦截，未知IP参考默认放行规则</tip>
            </div>

        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">未知IP默认规则</label>
        <div class="layui-input-block">

            {foreach \app\admin\model\SystemConfig::UNKNOWN_RULE_TYPE as $key=>$vo }
            <input type="radio" name="door_unknow_ip_rule" value="{$key}" title="{$vo}" {if sysconfig('door','door_unknow_ip_rule','deny')==$key }checked="" {/if}>
            {/foreach}
            <div>
                <tip>只有启用混合模式才生效。</tip><br>
                <tip>未知的IP如何处理。</tip>
            </div>

        </div>
    </div>

    <div class="hr-line"></div>
    <div class="layui-form-item text-center">
        <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
        <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
    </div>

</form>